local BuffRotate = class("BuffRotate")
local Vector3 = require("utils.Vector3")
local Vector2 = require("utils.Vector2")

function BuffRotate:ctor()
    self._speed = 150
end

function BuffRotate:start()
    for i = 1, 3 do
        if self["_arrow" .. i] then
            self["_arrTrans" .. i] = self["_arrow" .. i].transform
            self["_arrTrans" .. i]:RotateAround(self.transform.position, Vector3.up, (i - 1) * 120)
        end
    end
end

function BuffRotate:update(deltaTime)
    for i = 1, 3 do
        if self["_arrTrans" .. i] then
            self["_arrTrans" .. i]:RotateAround(self.transform.position, Vector3.up, deltaTime * self._speed)
            self["_arrTrans" .. i]:LookAt(self.transform)
        end
    end
end

function BuffRotate:onDestroy()
end

return BuffRotate
